package com.yunhe.policyfulfillment.authority.service;

import com.yunhe.common.exception.ArgumentErrorException;
import com.yunhe.common.exception.ObjectNotFoundException;
import com.yunhe.common.model.mybatis.PageResult;
import com.yunhe.policyfulfillment.authority.domain.PolicyCompanyUser;
import com.yunhe.policyfulfillment.authority.model.ChangePassword;
import com.yunhe.policyfulfillment.authority.model.DisableRecoveryUser;
import com.yunhe.policyfulfillment.authority.model.PolicyCompanyUserQueryCondition;
import com.yunhe.policyfulfillment.authority.model.UserLogin;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @description 政策兑现企业用户
 * @author hetao
 * @date 2021-08-24
 */
public interface PolicyCompanyUserService {

    /**
     * 登录
     * @param userLogin
     * @return PolicyCompanyUser
     */
    PolicyCompanyUser login(UserLogin userLogin) throws ObjectNotFoundException, ArgumentErrorException;

    /**
     * 新增
     * @author hetao
     * @date 2021/08/24
     **/
    void createPolicyCompanyUser(PolicyCompanyUser policyCompanyUser) throws ArgumentErrorException;

    /**
     * @Description 批量删除
     * @Param List<Long> ids
     * @Return
     * @Date 2021/9/18 10:45
     */
    void deletePolicyCompanyUser(List<Long> ids);

    /**
     * 刪除
     * @author hetao
     * @date 2021/08/24
     **/
    void deletePolicyCompanyUserByPrimaryKey(@Param("id") int id);

    /**
     * 更新
     * @author hetao
     * @date 2021/08/24
     **/
    void updatePolicyCompanyUserByPrimaryKey(PolicyCompanyUser policyCompanyUser) throws ArgumentErrorException;

    /**
     * 更新
     * @author hetao
     * @date 2021/08/24
     **/
    void updatePolicyCompanyUserByPrimaryKeySelective(PolicyCompanyUser policyCompanyUser) ;

    /**
     * 根据主键查询
     * @author hetao
     * @date 2021/08/24
     **/
    PolicyCompanyUser searchPolicyCompanyUserByPrimaryKey(@Param("id") int id);

    /**
     * 修改密码
     * @param changePassword
     */
    void changePolicyCompanyUserPassword(ChangePassword changePassword) throws ArgumentErrorException;

    PolicyCompanyUser searchPolicyCompanyUserByUserAccount(String userAccount);

    /**
     * @Description 分页筛选企业用户
     * @Param PolicyCompanyUserQueryCondition
     * @Return PageResult
     * @Date 2021/9/18 14:19
     */
    PageResult findPolicyCompanyUserByCondition(PolicyCompanyUserQueryCondition policyCompanyUserQueryCondition);

    /**
     * @Description 重置密码
     * @Param List<Long> ids
     * @Return
     * @Date 2021/9/18 14:48
     */
    String resetPassword(List<Long> ids) throws ArgumentErrorException;

    /**
     * @Description 禁用/恢复 企业账号
     * @Param DisableRecoveryUser disableRecoveryUser
     * @Return
     * @Date 2021/9/18 15:02
     */
    void disableRecoveryCompanyUser(DisableRecoveryUser disableRecoveryUser) throws ArgumentErrorException;

    /**
     * 注册用户
     * @param policyCompanyUser
     */
    void registPolicyCompanyUser(PolicyCompanyUser policyCompanyUser);
}
